{% extends "header.html" %}

{% block title %}
<title>登录</title>
{% endblock %}
{% block body %}

<div class="row col-md-8 col-md-offset-2" >
  <h1>登录</h1>
  <form method="post">
    {% csrf_token %}
  <div class="form-group">
    <label for="username">用户名</label>
    <input name="username" type="text" class="form-control" id="username" required placeholder="请输入用户名">
  </div>
  <div class="form-group">
    <label for="password">密码</label>
    <input name="password" type="password" class="form-control" id="password" required placeholder="请输入密码">
  </div>
    {% if error %}
    <div class="form-group">
    <p class="text-danger">{{ error }}</p>
  </div>
    {% endif %}

  <button type="submit" class="btn btn-primary">登录</button>
    <a class="btn btn-primary" href="/user/register" role="button">没有账号？去注册</a>
</form>


</div>


{% endblock %}